package com.neusoft.chess;

import java.awt.*;
import java.util.Map;

/**
 * @Author: duan
 * @Date: Create in 18:51 2020/9/28
 */
public class ShiChess extends Chess {
    public ShiChess(int px, int player) {
        super("shi", new Point(px, 1), player);
    }

    @Override
    public boolean isAbleMove(Point t, Map<Point, Chess> map) {
        return isLine(t) == 1 && getStepCount(t) == 1 && isInHome(t);
    }
}
